
@array = (0..5);
print("Before function call, array = @array\n");
firstSub(@array);
print("After function call, array =  @array\n");

sub firstSub{
    $_[0] = "A";
    $_[1] = "B";
}



@array = (0..5);
print("Before function call, array = @array\n");
firstSub(@array);
print("After function call, array =  @array\n");

sub firstSub{
    ($firstVar, $secondVar) = @_;

    $firstVar = "A";
    $secondVar = "B";
}


$firstVar = 10;
@array    = (0..5);

print("Before function call\n");
print("\tfirstVar = $firstVar\n");
print("\tarray    = @array\n");

firstSub(@array);

print("After function call\n");
print("\tfirstVar = $firstVar\n");
print("\tarray    = @array\n");

sub firstSub{
    ($firstVar, $secondVar) = @_;

    $firstVar = "A";
    $secondVar = "B";
}


